package router

import (
"github.com/gin-gonic/gin"
"project/app/electromechanical/apis"
)

func init()  {
	routerCheckRole   = append(routerCheckRole, student)
	routerNoCheckRole = append(routerNoCheckRole, stu)
}
// 无需认证的路由代码
func stu(v1 *gin.RouterGroup) {
	r := v1.Group("/auth")
	{
		r.GET("insegrals", apis.Downnoinsegrals)
		r.POST("add", apis.Add)
		r.POST("stulogin", apis.Login)
	}
}

// 需认证的路由代码
func student(v1 *gin.RouterGroup) {
	r := v1.Group("/student")
	{	//学生列表
		r.GET("line", apis.GetStuList)
		//学生详情
		r.GET("details", apis.GetStuDetails)
		//学号查询学生
		r.GET("number", apis.GetStuNumber)
		//条件查询学生列表
		r.GET("Lists", apis.GetStuLists)
		//球队查询学生列表
		r.GET("Team", apis.GetStuTeam)
		//心里预警查询学生列表
		r.GET("PsychologicalWarning", apis.GetStuWarning)
		//班委查询学生列表
		r.GET("Committee", apis.GetStuCommittee)
		//党员
		r.GET("Member", apis.GetStuMember)
		//少数民族
		r.GET("Nation", apis.GetStuNation)
		//学生会
		r.GET("StudentUnion", apis.GetStuUnion)
		//奖学金搜素
		r.GET("Scholarship", apis.Scholarship)
		//奖学金导出
		r.GET("downscholarship", apis.Downscholarship)
		//获奖信息导出
		r.GET("insegrals", apis.Downinsegrals)
		// 处罚信息导出
		r.GET("noinsegrals", apis.Downnoinsegrals)
		//添加奖励
		r.POST("addpoint", apis.Addpoint)
		//添加惩罚
		r.POST("delpoint", apis.Delpoint)
		//删除奖励
		r.DELETE("deladdpoint", apis.Deladdpoint)


		//添加表单
		r.POST("add", apis.Add)
	}
}
